<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="general style.css"/>
<script type="text/javascript" src="links.js">
</script>
<title>HI Resource Management</title>

</head>

<body>
  <table id="container">
      <tr>
        <td id="header" colspan="2">
          <h1>HI Resource Management Catalog</h1> 
        </td>
      </tr>
      <tr>
        <td id="menuback">
        <table id="menucontainer">
          <tr>
            <td class="menu">
              <a href="index.html">Home</a>
            </td>
          </tr>
          <tr>
            <td class="menu">
              <a href="software.html">Software</a>
            </td>
          </tr>
          <tr>
            <td class="menu">
              <a href="#books.php">Books</a>
            </td>
          </tr>
          <tr>
            <td class="menu">
              <a href="#hardware.php">Hardware</a>
            </td>
          </tr>
          <tr>
            <td class="menu">
              <a href="#Knowledge Base.php">Knowledge Base</a>
            </td>
          </tr>
          <tr>
            <td class="menu">
              <a href="#People.php">People</a>
            </td>
          </tr>  
        </table></td>
        <td id="content">
          <h3>Software</h3>
          <p>Please note below all current software entries</p>
		  <script type="text/javascript">
		  {
			  var xmlDoc=null;
			  if (window.ActiveXObject)
              {// code for IE
                  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
              }
              else if (document.implementation.createDocument)
              {// code for Mozilla, Firefox, Opera, etc.
                  xmlDoc=document.implementation.createDocument("","",null);
              }
			  if (xmlDoc!=null)
			  {
				  xmlDoc.async = false;
				  xmlDoc.load("data.xml");
				  var soft_array = xmlDoc.getElementsByTagName("software");
				  
				  document.write('<table id="data">');
				  document.write('<tr><td class="item">Product Name</td><td class="owner">Current Owner</td></tr>');
				  
				  for (i=0;i<soft_array.length;i++)
				  {
					  document.write("<tr>");
					  document.write('<td class="item">');
					  document.write(soft_array[i].getElementsByTagName("item_name")[0].firstChild.nodeValue);
					  document.write("</td>");
					  document.write('<td class="owner">');
					  document.write(soft_array[i].getElementsByTagName("owner")[0].firstChild.nodeValue);
					  document.write("</td>");
					  document.write("</tr>");
				  }
				  
				  document.write("</table>");
			  }
		  }
		  </script>
          <p>Welcome to the HI Resource Management Tool. Please navigate to a page from the menu to continue.<br/></p>
          <input type="button" onclick="openItemForm()" value="new Software Item"/> 
          <input type="button" onclick="openPersonForm()" value="add new individual"/>
        </td>
      </tr>
      <tr>
        <td id="footer" colspan="2"></td>
      </tr>
  </table>
</body>
</html>
